echo off
color 0d
echo bat Function example
echo =================================
echo =======Func with return value====
echo =================================
set return=123
set returnPara=321
echo return:%return%
echo returnPara:%returnPara%
echo befora call myFuncReturnValue
call:myFuncReturnValue returnPara abc

echo after call myFuncReturnValue
echo return:%return%
echo returnPara:%returnPara%
exit /B 0
pause

:myFuncReturnValue
echo myFuncReturnValue
echo myFuncReturnValue First para:%1
echo myFuncReturnValue Second para:%2
set "%~1=%2%"
set return=%2
goto:eof
